#pragma once
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>

#define CREATE_PERM 0666
#define SIZE 1000
#define FLASH_NOW 1
#define FLASH_LINE 2
#define FLASH_ALL 4

typedef struct FILE_IO
{
    int _fd;
    int _flag;
    char _buffer[SIZE];
    int _pos;
    
}_FILE;

_FILE* _fopen(const char* file_name, const char* file_mode);

void _fclose(_FILE* fp);

int _fwrite(const char* str, int len,_FILE* fp);

void _fflush(_FILE* fp);
